<?php
header("Content-type: image/png");

$num   = !empty($_GET['num']) ? $_GET['num'] : 0 ;
$total = !empty($_GET['total']) ? $_GET['total'] : 3 ;
$width = ceil($num / $total * 200);

$img = imagecreatetruecolor(200, 30);
$bg_color = imagecolorallocate($img, 33, 128, 193);	//背景
$over_bg  = imagecolorallocate($img, 96, 165, 215);	//覆盖在上面的背景
$text_color  = imagecolorallocate($img, 255, 255, 255);	//
imagefill($img, 0, 0, $bg_color);
imagefilledrectangle($img, 0, 0, $width, 30, $over_bg);
imagestring($img, 5, 10, 8, $num .'/' . $total, $text_color);

imagepng($img);
imagedestroy($img);


?>